There are two primary methods for calculating total daily insulin dose (TDD): by adding up current doses or using a weight-based formula. 
Method 1: Tallying existing doses
If a patient already taking insulin, the most accurate way to calculate the TDD is to add up all the insulin they take over a 24-hour period. 
Example:
If a patient takes 25 units of basal insulin daily and 8 units of mealtime insulin with each of your three meals, your TDD is calculated as:
Method 2: Weight-based formulas
For patients new to insulin therapy or for initial estimates, healthcare providers may use weight-based calculations as a starting point.
How the Total Daily Dose is Split Between Basal and Bolus Insulin
Once a total daily dose is established, it is typically split between basal (background) and bolus (mealtime) insulin. 
Factors That Influence Your Insulin Needs
Multiple factors can affect an individual's insulin needs, making the required dose highly individualized. These can include: 
Sources:
https://www.verywellhealth.com/insulin-dosages-6746972
https://pressbooks.uiowa.edu/pedsendocrinology/chapter/total-daily-dose/#:~:text=range%20is%20used.-,TDD%20*%20weight%20(in%20kg)%20=%20total%20units%20of%20insulin,*%2059kg%20=%2044.3%20units/day
https://pmc.ncbi.nlm.nih.gov/articles/PMC6375528/#:~:text=initiation%20of%20insulin.-,1,readings%20need%20to%20be%20evaluated.

https://patient.info/medicine/insulin